package com.jizhi.onework.dao;

import com.jizhi.onework.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    @Select("select * from y_user wehre id=2")
    User findByName(String str);

    /**
     * 根据用户名查询
     * 
     * @param userName
     * @return
     */
    User selectUserByUserName(@Param("userName") String userName);

    /**
     * 根据电话查询
     * 
     * @param phone
     * @return
     */
    User selectUserByPhoneNumber(@Param("phone") String phone);

    /**
     * 根据邮箱查询
     *
     * @param email
     * @return
     */
    User selectUserByEmail(@Param("email") String email);
}